{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{$seoTitle}－{:config('common.site_name')}</title>
<meta name="keywords" content="{$seoKeywords}" />
<meta name="description" content="{$seoDescription}" />
<meta name="author" content="{:config('common.site_name')}" />
{/block}
{block name="header"}{include file="widget/header" /}{/block}
<!--main -->
{block name="main"}
<div class="container">
<ol class="breadcrumb bg-white mb-2">
  <li class="breadcrumb-item">
    <i class="fa fa-home text-purple"></i>
    <a href="{:DcUrl('cms/index/index')}">首页</a>
  </li>
  <li class="breadcrumb-item active">{$term_name|DcHtml}</li>
</ol>
{php}
function randColor($key=0){
    $array = [];
    $array[0] = 'bg-success';
    $array[1] = 'bg-secondary';
    $array[2] = 'bg-warning';
    $array[3] = 'bg-danger';
    $array[4] = 'bg-info';
    $array[5] = 'bg-primary';
    $array[6] = 'bg-purple';
    return $array[$key];
}
{/php}
{assign name="categorys" value=":cmsCategorySelect(['field'=>'term_id,term_name,term_slug,term_action','parent'=>['eq',$term_id],'status'=>'normal','limit'=>30,'sort'=>'term_order','order'=>'desc'])"}
<div class="bg-white pb-3 mb-2 text-center d-flex flex-wrap justify-content-between">
  {volist name="categorys" id="category" mod="6"}
  <a class="mt-3 d-flex flex-column justify-content-between icon-font" href="{:cmsUrlCategory($category)}">
    <span class="mx-auto icon-circle {:randColor($mod)}">{$category.term_name|cmsSubstr=0,1,false}</span>
    <span class="mt-1 icon-text">{$category.term_name|cmsSubstr=0,6,false}</span>
  </a>
  {/volist}
</div>
<!--typeList-->
{volist name="categorys" id="category"}
<div class="card border-0 rounded-0 mb-2">
  <div class="card-header bg-white border-0">
    <div class="w-100 d-flex flex-row justify-content-between align-items-center">
      <a class="text-decoration-none font-weight-bold text-purple" href="{:cmsUrlCategory($category)}">{$category.term_name}</a>
      <a class="h6 text-muted" href="{:cmsUrlCategory($category)}"><i class="fa fa-angle-double-right"></i></a>
    </div>
  </div>
<!--listItem-->
  <div class="card-body row py-0">
    {volist name=":cmsSelect(['field'=>'info_name,info_slug,info_action,info_create_time','term_id'=>['eq',$category['term_id']],'status'=>'normal','limit'=>10,'sort'=>'info_id','order'=>'desc'])" id="cms"}
      {include file="widget/item" /}
    {/volist}
  </div>
</div>
{/volist}
</div>
{/block}
<!-- -->
{block name="footer"}{include file="widget/footer" /}{/block}